package com.newer.dao.crm;

import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import com.newer.pojo.crm.Customer;
import com.newer.pojo.crm.CustomerExample;

@Repository("customerMapper")
public interface CustomerMapper {
    long countByExample(CustomerExample example);

    int deleteByExample(CustomerExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(Customer record);

    int insertSelective(Customer record);

    List<Customer> selectByExample(CustomerExample example);

    Customer selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") Customer record, @Param("example") CustomerExample example);

    int updateByExample(@Param("record") Customer record, @Param("example") CustomerExample example);

    int updateByPrimaryKeySelective(Customer record);

    int updateByPrimaryKey(Customer record);
    //定区关系客户关联客户
	void assigncustomerstodecidedzone(@Param("decidedzoneId")Integer decidedzoneId, @Param("customerIds")List<Integer> customerIds);

	// 根据客户的地址查询定区id
	String findDecidedzoneIdByAddress(String address);
}